- [Instructor] As their name suggests
one of the primary uses for operational amplifiers
is to amplify signals.
And one of the simplest op-amp configurations
to do that is the inverting amplifier.
This configuration uses two resistors
to provide divide feedback to the op-amp
and it's called an inverting amplifier
because the output signal will be negative
or a flipped version of the input signal
and scaled by some amount.
One of the resistors connects the input signal
to the inverting or negative op-amp terminal
and I'll refer to that as R in,
the other resistor, R f, provides feedback
from the output of the op-amp
back to the inverting input.
The non-inverting, or positive op-amp terminal,
is simply connected to ground.
The inverting amplifiers closed-loop voltage gain
which is the ratio of its output voltage
divided by the input voltage,
is equal to negative R f over R in.
R f and R in are both fixed values
that I can choose when designing the circuit.
So for example if I decided to make my feedback
resistor ten kiloohms and the input resistor one kiloohm,
ten k divided by one k, means my inverting amplifier
will have a voltage gain of negative ten.
That means the output voltage will be negative ten times
whatever the input voltage is.
Now rather than just remembering that this equation
applies to this specific circuit,
let's dive into why this combination of resistors
produces a negative gain.
According to the first golden rule of op-amps,
the op-amp will adjust its output signal
however it can to make the input signals match.
Since the non-inverting terminal in this configuration
is tied directly to ground
the op-amp will try to make the voltage
at the inverting terminal be zero volts as well.
So I'll just pretend like that node is always held at zero.
If the input voltage increases to a positive value,
let's say 50 millivolts, due to Ohm's Law,
that 50 millivolt drop across the one kiloohm
input resistor means 50 microamps of current
will flow through the input resistor.
Now according to the second golden rule of op-amps,
no current will flow into the input terminals.
So all of that 50 microamps will pass
through the feedback resistor.
Using Ohm's Law again, for 50 microamps
to flow through the ten kiloohm feedback resistor
will require a 500 millivolt voltage drop across it.
Since the voltage across the feedback resistor drops
from left to right, the op-amp will have to produce
negative 500 millivolts at its output terminal
to maintain zero volts at the inverting input terminal.
If the input voltage is lowered down to zero volts,
then there will not be a voltage drop
across the input resistor so no current flows
into the circuit.
And since there's no current flowing
through the input resistor
there also won't be any current flowing
though the feedback resistor
to cause a voltage drop across it
so the output voltage will also be at zero.
Finally if the input voltage drops down to a negative value
like negative 50 millivolts
that will cause a 50 microamp current
to flow in the opposite direction
through the input terminal as if it's exiting the circuit.
The same amount of current will flow in that direction
through the feedback resistor
creating a 500 millivolt difference
across the resistor that increases from left to right
which means the output voltage this time
will be positive 500 millivolts.
To demonstrate that behavior I've built
that inverting amplifier circuit on my breadboard
with a one kiloohm input resistor
and a ten kiloohm feedback resistor
to achieve a gain of negative ten.
My function generator is providing a 400 millivolt
peak to peak sin-wave as the input signal
which I'm measuring on channel one
of my oscilloscope in yellow
and the output of the amplifier circuit is shown
in blue on channel two.
As expected, I can see that the output signal
is approximately ten times larger
than the input signal
and its been inverted.
So when the input voltage is positive
the output is negative and vice versa.
Another common op-amp configuration
is the non-inverting amplifier.
It's similar to the inverting amplifier configuration
except that this time, the resistor connected
to the inverting input terminal,
which I've labeled as R 2,
is tied to ground,
and the input voltage for the circuit
is sent directly to the non-inverting input terminal.
Drawing the input terminals so that they cross over
like this can look a bit confusing on circuit diagrams
so you'll commonly see the non-inverting input
circuit drawn like this.
With the op-amp flipped vertically
so that the non-inverting input terminal is on top
and the inverting input terminal is on the bottom.
This circuit works using a similar concept
as the inverting amplifier configuration.
For a simple example
let's say the feedback resistor
is ten kiloohms and the second resistor
between the inverting terminal
and ground is one kiloohm.
If the voltage at the non-inverting input terminal
is ten millivolts, the op-amp will change its output
to make the voltage at the inverting terminal match it.
That means that there should be a ten millivolt drop
across the bottom resistor
which will create a ten microamp current flowing
through it towards ground.
That same ten microamp current
will also flow through the ten kiloohm feedback resistor
as well which produces a 100 millivolt drop across it.
The ten millivolt drop across the bottom resistor
plus the 100 millivolt drop across the feedback resistor
means the output voltage will be 110 millivolts
when there's a ten millivolt input signal.
That's a positive output for a positive input.
I can calculate the voltage gain for this circuit
as one plus the feedback resistance
divided by the other resistance, R 2.
So for the example circuit with a ten kiloohm
feedback resistor and a 100 kiloohm R 2,
the voltage gain will be 11.
Since this equation adds one to the ratio
of the resistor values, I can never build
a non-inverting op-amp circuit that will have
a gain of less than one.
I can't use the circuit to attenuate signals.
At the very least, if I lower the feedback
all the way down to zero ohms by creating a short circuit,
this circuit will act similar to a unity gain buffer
having a gain of one.
To demonstrate the non-inverting op-amp configuration
I've built the circuit on my breadboard
but instead of using static values for both resistors,
I've decided to replace the feedback resistor
with a ten kiloohm potentiometer
which I'm using as a variable resistor
to allow me to manually adjust the gain of the circuit.
To begin I've adjusted the potentiometer
to have a resistance of one kiloohm.
So it matches the resistance
of the static value one kiloohm resistor.
That gives the non-inverting op-amp circuit a gain of two
and I can see that the amplitude
of the output signal in blue
is roughly twice as large as the input signal in yellow
and that the input and output signals follow each other
in the same direction.
The output is not inverted any more.
If I turn the potentiometer knob all the way down
to have nearly zero resistance
the circuit acts like a voltage follower
and has a gain of approximately one.
And if I turn the potentiometer knob
in the other direction until it reaches
ten kiloohms, the gain will increase accordingly
until the output is eleven times larger
than the input signal.